package cn.lsnu.common.interfacetools.interfacedao;

import cn.lsnu.common.interfacetools.interfaceentity.Page;

import java.util.List;

/**
 * @Description   dao层顶级抽象类
 * @author  lin
 * @Datetime  2020/2/1 17:14
 */  
public interface TopDao<T> {

    //保存数据
    public void save(T entity) throws Exception;

    //删除数据
    public void delete(T entity) throws  Exception;

    //更新数据
    public void update(T entity) throws  Exception;

    //查找一条数据
    public T get(String key) throws  Exception;

    //多条数据查找
    public T getEntity(T entity) throws  Exception;

    //查找多条数据
    public List<T> findList(T entity) throws  Exception;

    //得到分页数据
    public Page<T> findPage(T entity) throws  Exception;

    //得到数据的条数
    public Integer count()throws  Exception;

    //得到有条件的数据条数
    public Integer count(T entity)throws  Exception;


}
